The International Telecommunication Union (“ITU”) is the United Nations Specialized Agency in the field of telecommunications. The ITU Telecommunication Standardization Sector (“ITU-T”) is a permanent organ of the ITU. The ITU-T is responsible for studying technical, operating and tariff questions and issuing Recommendations on them with a view toward standardizing telecommunications on a worldwide basis.
Abstract Syntax Notation One (“ASN.1”) is an information technology standard for communicating between computer applications. ITU-T Recommendation X.690 specifies ASN. 1 encoding rules, including specification of basic encoding rules (“BER”), canonical encoding rules (“CER”), and distinguished encoding rules (“DER”). It is implicit in the specification of these encoding rules that they are also used for decoding.
ITU-T Recommendation X.690 is also published as ISO/IEC International Standard 8825-1. ISO is the International Organization for Standardization. IEC is the International Electrotechnical Commission.
With BER, a sender of information has various choices about encoding data values. With CER and DER, the sender has more restrictions than otherwise allowed by BER. CER and DER differ from one another in the set of restrictions that they place on BER.
A key difference is that DER uses a definite length form of encoding, while CER uses an indefinite length form of encoding. In general, (a) DER is more suitable than CER if the encoded value is sufficiently small to fit into available memory, or if there is a need to rapidly skip nested values, (b) CER is more suitable than DER if the encoded value is large and cannot fit into available memory, or if it is necessary to encode and transmit a part of a value before the entire value is available, and (c) BER is more suitable than CER or DER if the encoding contains a set value or set-of value, and if there is no need for CER and DER restrictions. CER and DER may increase memory and CPU overhead to ensure that set values and set-of values have only a single possible encoding.
Because of DER's ease of use, many applications implement a framework to handle DER encoding data only. In order to parse BER encoded data, such DER-compatible applications would need to create another framework. Some applications may handle a single level of BER encoding, but are less successful in handling BER encoding with multiple levels of indefinite length.
Accordingly, a need has arisen for a method, system and computer program product for parsing an encoding, in which various shortcomings of previous techniques are overcome.